<script >
export default {
    data() {
        return {
            skills: null
        }
    }, methods: {
        getData() {
            console.log('请求数据......');
            setTimeout(() => {
                console.log('数据请求完毕..');
                this.skills = 'html-css-js'
            }, 1000)
            setTimeout(()=>{
                this.skills=null
            },3000)
        }
    }
}
</script>

<template>
    <input type="button" value="数据请求......" @click="getData">
    <div v-if="skills == null">加载中...</div>
    <div v-else>
        <h1>数据已达到...显示中......</h1>
        <div>{{ skills }}</div>
    </div>
</template>

<style scoped></style>
